package sevensoft.创建型模式.工厂模式.反射工厂.store;

import sevensoft.创建型模式.工厂模式.反射工厂.guns.Gun;
import sevensoft.创建型模式.工厂模式.反射工厂.factory.SimpleGunFactory;

public class GunStore {
    public <T extends Gun> Gun orderGun(Class<T> gunClass){
        SimpleGunFactory simpleGunFactory = new SimpleGunFactory();
        Gun gun = simpleGunFactory.createGun(gunClass);
        gun.load();
        gun.shoot();
        return gun;
    }

}
